package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * AccChartOfAccount generated by hbm2java
 */
@Entity
@Table(name="acc_chart_of_account"
    ,catalog="lmis"
    , uniqueConstraints = @UniqueConstraint(columnNames="ACC_CODE") 
)
public class AccChartOfAccount  implements java.io.Serializable {


     private Short accNo;
     private AccAccountType accAccountType;
     private String accCode;
     private String accName;
     private String isCtrlAcc;

    public AccChartOfAccount() {
    }

	
    public AccChartOfAccount(AccAccountType accAccountType, String accCode, String accName) {
        this.accAccountType = accAccountType;
        this.accCode = accCode;
        this.accName = accName;
    }
    public AccChartOfAccount(AccAccountType accAccountType, String accCode, String accName, String isCtrlAcc) {
       this.accAccountType = accAccountType;
       this.accCode = accCode;
       this.accName = accName;
       this.isCtrlAcc = isCtrlAcc;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="ACC_NO", unique=true, nullable=false)
    public Short getAccNo() {
        return this.accNo;
    }
    
    public void setAccNo(Short accNo) {
        this.accNo = accNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ACC_TYPE_NO", nullable=false)
    public AccAccountType getAccAccountType() {
        return this.accAccountType;
    }
    
    public void setAccAccountType(AccAccountType accAccountType) {
        this.accAccountType = accAccountType;
    }

    
    @Column(name="ACC_CODE", unique=true, nullable=false, length=50)
    public String getAccCode() {
        return this.accCode;
    }
    
    public void setAccCode(String accCode) {
        this.accCode = accCode;
    }

    
    @Column(name="ACC_NAME", nullable=false)
    public String getAccName() {
        return this.accName;
    }
    
    public void setAccName(String accName) {
        this.accName = accName;
    }

    
    @Column(name="IS_CTRL_ACC", length=1)
    public String getIsCtrlAcc() {
        return this.isCtrlAcc;
    }
    
    public void setIsCtrlAcc(String isCtrlAcc) {
        this.isCtrlAcc = isCtrlAcc;
    }




}


